<html>
	<head>
		<title>:: Architecture Guide ::</title>
	</head>
	<body>
	
   <p>We've implemented all the components so that those can be invoked within a java class or as a REST service (need to deploy within a web container). Following description will explain how each component was implemented. </p>
   
   <h2>Shape File Converter</h2>
   
   <p>We used the capabilities of FWTools to do this conversion. Shape files converted using FWTools had small problems (like wrong namespace) and we evaluated teKML to correct those. But it was giving more trouble than we wanted and we simply implemented those corrections on our own. </p>
   
   <p>When we get a request, we first call ogr2ogr for the conversion (installation of FWTools is a requirement for this project, explained in installation guide. ogr2ogr comes bundled with FWTools). Then we take the output kml file, do the necessary corrections and make that the final output. </p>
   
   <h2>Wateroneflow to KML Conversion</h2>
   
   <p>We were only concerned about the unit value conversion service. We were initially implementing this on our own. But we later found out that this was already implemented by some one else. We wrote a wrapper to use the same service underneath our code.</p>
   <p>When we get a request, we re-route the request to the proper place, get the response and send back to the user. </p>	
   
   <h2>KML to/from RDF Conversion</h2>
   
   <p>This conversion is far more trickier than we expected. The main reason was there were no defined mapping between the semantics of two different schemas. </p> 
   <p>We initially implemented this using an xml style sheet. But it got much more complicated than we wanted and we moved to implement the same code using java with XPaths. </p>
   <p>Now both these conversions are implemented within Java and supports limited set of constructs. But one can easily extend the current functionality to support future requirements. </p>
   
   <h2>GeoTIFF to KML Conversion</h2>
   
   <p>This conversion was already done by a student in a previous google Summer of Code program within FWTools project. But unfortunately the python implementation was not bundled with the FWTools version we were using. So we took the python source separately and added to our project. </p>
   <p>This Python code requires some python modules to be present in the path and all these modules could be found within FWTools installation. So we wrote a wrapper script to set proper paths and then execute the conversion python script.</p>
   
   <h2>Limitations</h2>
   <ol>
     <li>Current conversion generates set of files as the output. For this to be properly rendered within a kml supported tool (like google earth), these files should be zipped within a kmz file. But for some reason, simple zipping of files didn't work with google earth </li>
     <li>Current KML to/from RDF conversion supports a limited set of constructs. It should be extended to support more constructs</li>
        
   </ol>
	
	</body>
</html>